

var djs = "9999"; //倒计时总秒数
var diff_day = "1";
var diff_hour = "1";
var diff_minute = "1";
var diff_second = "11";

//退款处理倒计时
var intDiff = parseInt(djs);//倒计时总秒数量

function timer(intDiff) {
	window.setInterval(function() {
		var day = diff_day,
			hour = diff_hour,
			minute = diff_minute,
			second = diff_second;//时间默认值 
		if (intDiff > 0) {
			day = Math.floor(intDiff / (60 * 60 * 24));
			hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
			minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
			second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
		}
		if (minute <= 9)
			minute = '0' + minute;
		if (second <= 9)
			second = '0' + second;
		$('#day_show').html(day);
		$('#hour_show').html(hour);
		$('#minute_show').html(minute);
		$('#second_show').html(second);
		intDiff--;
	}, 1000);
}

$(function() {
	timer(intDiff);
});
